<script setup lang="ts">
import zhCn from 'element-plus/es/locale/lang/zh-cn';
import 'dayjs/locale/zh-cn';

const isElectron = inject('isElcetron', false);
// 如果是electron应用模式，则应用容器和消息框位置需要减去标题栏高度
if (isElectron) {
  import('./style-electron-titlebar-fix.css');
}
</script>

<template>
  <windows-title-bar v-if="isElectron"></windows-title-bar>
  <el-config-provider :locale="zhCn">
    <div id="app-container">
      <router-view />
    </div>
  </el-config-provider>
</template>

<style src="./style.css"></style>
<style src="@mdi/font/css/materialdesignicons.min.css"></style>
<style lang="scss">
:root {
  font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
  color: var(--el-text-color-primary);
}

:root {
  --electron-window-titlebar-height: 30px;
  --el-header-height: 60px;
  --el-footer-height: 60px;
}

#app {
  border-radius: 0px;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

#app {
  --el-menu-bg-color: transparent;
  --el-menu-border-color: transparent;
}

#app-container {
  height: 100%;
}

.el-container {
  height: 100%;
  width: 100%;
}

.el-scrollbar {
  width: 100%;
}

.el-scrollbar__view {
  width: 100%;
}

.el-scrollbar__bar {
  display: block !important;
}

.el-message {
  margin-top: calc(15px + var(--el-header-height));
}
</style>
